/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package AccesoDatos.Persistencia.Entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author sebaxtian
 */
@Entity
@Table(name = "EDITORIAL")
@NamedQueries({
    @NamedQuery(name = "EEditorial.findAll", query = "SELECT e FROM EEditorial e"),
    @NamedQuery(name = "EEditorial.findByCodigoeditorial", query = "SELECT e FROM EEditorial e WHERE e.codigoeditorial = :codigoeditorial"),
    @NamedQuery(name = "EEditorial.findByNombre", query = "SELECT e FROM EEditorial e WHERE e.nombre = :nombre"),
    @NamedQuery(name = "EEditorial.findByPaginaweb", query = "SELECT e FROM EEditorial e WHERE e.paginaweb = :paginaweb"),
    @NamedQuery(name = "EEditorial.findByPais", query = "SELECT e FROM EEditorial e WHERE e.pais = :pais")})
public class EEditorial implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CODIGOEDITORIAL")
    private Integer codigoeditorial;
    @Basic(optional = false)
    @Column(name = "NOMBRE")
    private String nombre;
    @Column(name = "PAGINAWEB")
    private String paginaweb;
    @Basic(optional = false)
    @Column(name = "PAIS")
    private String pais;

    public EEditorial() {
    }

    public EEditorial(Integer codigoeditorial) {
        this.codigoeditorial = codigoeditorial;
    }

    public EEditorial(Integer codigoeditorial, String nombre, String pais) {
        this.codigoeditorial = codigoeditorial;
        this.nombre = nombre;
        this.pais = pais;
    }

    public Integer getCodigoeditorial() {
        return codigoeditorial;
    }

    public void setCodigoeditorial(Integer codigoeditorial) {
        this.codigoeditorial = codigoeditorial;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getPaginaweb() {
        return paginaweb;
    }

    public void setPaginaweb(String paginaweb) {
        this.paginaweb = paginaweb;
    }

    public String getPais() {
        return pais;
    }

    public void setPais(String pais) {
        this.pais = pais;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codigoeditorial != null ? codigoeditorial.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof EEditorial)) {
            return false;
        }
        EEditorial other = (EEditorial) object;
        if ((this.codigoeditorial == null && other.codigoeditorial != null) || (this.codigoeditorial != null && !this.codigoeditorial.equals(other.codigoeditorial))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "AccesoDatos.Persistencia.Entidad.EEditorial[codigoeditorial=" + codigoeditorial + "]";
    }

}
